<template>
  <view class="header" :class="[vuexScroll ? 'isScroll' : '']">
    <u-sticky offset-top="0" h5-nav-height="0" :enable="enable">
      <!-- <u-navbar :is-back="false" height="96" :border-bottom="false"> -->
      <view class="nav-container">
        <!-- 这里是状态栏 -->
        <!-- #ifdef APP-PLUS || H5 -->
        <view class="status-bar" :style="{ height: statusBarHeight + 'rpx' }"></view>
        <!-- #endif -->
        <!-- <view class="status-bar"></view> -->
        <!-- 头部分 -->

        <view class="header-section flex flex-jc-sb">
          <!-- 位置 -->
          <view class="address flex" @click="goPages('/pages_common/pages_index/selectCity/selectCity')">
            <image src="https://files.yzsheng.com/client/index/buyCar/zuobiao.png" style="width: 28rpx; height: 38rpx"></image>
            <text class="address-text" v-if="!vuexDistrict">{{
              vuexCity === "" ? "定位失败" : vuexCity | cutString(8)
            }}</text>
            <text class="address-text" v-else>{{
              vuexDistrict | cutString(8)
            }}</text>
          </view>

          <view class="tab">
            <!-- 要新车模块注释 -->
            <view class="newSearch" @click="
                goPages(
                  '/pages_common/pages_index/maintenanceSearch/maintenanceSearch'
                )
              ">
              <u-search height="60" :disabled="true" placeholder="保养项目/换轮胎/洗车美容" :show-action="false"></u-search>
            </view>
            <!-- 要新车模块打开 -->
            <!-- <u-tabs :list="swiperList" :active-item-style="activeItem" active-color="#333333"
							inactiveColor='#666666' :is-scroll="false" :current="swiperCurrent" @change="change"
							font-size="28"></u-tabs> -->
          </view>

          <view class="order" @click="saoyisao()">
            <i-icon icon="iconsaoyisao" type="single" size="37rpx" color="#3D3D3D"></i-icon>
            <view style="font-size: 18rpx">扫一扫</view>
          </view>
        </view>

        <!-- 搜索(要新车模块打开) -->
        <!-- <view class="search" @click="goPages('/pages_common/pages_index/search/search')"
					v-show="swiperCurrent===1">
					<u-search height="60" :disabled="true" placeholder="搜索品牌/车型" :show-action="false"></u-search>
				</view>
				<view class="search" @click="goPages('/pages_common/pages_index/maintenanceSearch/maintenanceSearch')"
					v-show="swiperCurrent===0">
					<u-search height="60" :disabled="true" placeholder="保养项目/换轮胎/洗车美容" :show-action="false"></u-search>
				</view> -->
      </view>
    </u-sticky>
    <!-- #ifndef MP-WEIXIN -->
		<!-- 要新车模块注释 -->
    <car-maintenance @success="getHight" ref="addCar" :specifAll="specifAll"></car-maintenance>
		<!-- 要新车模块打开 -->
    <!-- <pageSwiper ref="pageSwiper" :height="tabHight+'rpx'" :dataLength="2" :initIndex="swiperCurrent"
			@swiperChange="swiperChange" swiperType="static">
			<pageSwiperItem :height="tabHight+'rpx'">
				<car-maintenance @success='getHight' ref='addCar' :specifAll='specifAll'></car-maintenance>
			</pageSwiperItem>
			<pageSwiperItem :height="tabHight+'rpx'">
				<list-car @success='getHight' :rangeValues='rangeValues3' ref='refresh' :height='statusBarHeight'
					:navHight='height' :enable='enable' :index='swiperCurrent'></list-car>
			</pageSwiperItem>
		</pageSwiper> -->
    <!-- #endif -->
    <!-- #ifdef MP-WEIXIN -->
    <view v-if="swiperCurrent === 0">
      <car-maintenance @success="getHight" ref="addCar" :specifAll="specifAll"></car-maintenance>
    </view>
		<!-- 要新车模块打开 -->
    <!-- <view v-if="swiperCurrent===1">
			<list-car @success='getHight' :rangeValues='rangeValues3' ref='refresh' :height='statusBarHeight'
				:navHight='height' :enable='enable' :index='swiperCurrent'></list-car>
		</view> -->

    <!-- #endif -->
    <!-- 新车领取-红包 -->
    <!-- <view v-if="isNew" class="new">
			<view>
				<view>
					<image src="https://files.yzsheng.com/client/index/carMaintenance/hongbao2.png"
						style="width:578rpx ;height: 821rpx;"></image>
				</view>
				<view style="position: absolute;bottom:130rpx;width: 100%;margin-left: 27rpx;">
					<view class="lj" @click="login">立即领取</view>
				</view>
			</view>

			<view @click="clickMask" style="margin-left: 27rpx;">
				<image src="https://files.yzsheng.com/client/index/carMaintenance/guanbi.png"
					style="width: 50rpx;height: 50rpx;"></image>
			</view>
		</view> 
    <view :class="['mask', isNew ? 'mask-show' : 'mask-hide']" @touchstart="clickMask()"></view>
    -->
    <u-modal v-model="isLocation" title="温馨提示" :mask-close-able="true" :show-cancel-button="false" :show-confirm-button="false">
      <view style="margin: 37rpx 65rpx; color: #666666; font-size: 30rpx">您当前城市是{{ city }}{{ district }}，是否切换当前位置?
      </view>
      <view class="location-btn flex flex-jc-c">
        <view class="location-btn-1" @click="isLocation = false">不切换</view>
        <view class="location-btn-2" @click="changeAdd">切换</view>
      </view>
    </u-modal>
    <!-- <view>
			<u-no-network></u-no-network>
		</view> -->
    <!-- </page-loading> -->
    <view class="balloon" v-if="isWashing" @click="orderDetial">
      <view class="scale">{{ washingTime }}</view>
    </view>
    <u-modal v-model="showOrderModal" content="已有订单，是否结束" :show-cancel-button="true" @confirm="setSailJiesuan" @cancel="orderDetial"></u-modal>
    <u-modal v-model="descObj.show" :content="descObj.content"></u-modal>
  </view>
</template>

<script src="./index.js"></script>

<style lang="scss">
  .isScroll {
    // position: fixed;
    // height: 100%;
    // width: 100%;
    // display: block;
    // height: calc(100vh - 100rpx);
    // overflow: hidden;
  }

  @import "./index.scss";
</style>
